//
//  Macros.h
//  Rong360
//
//  Created by tianliwei on 15/2/14.
//  Copyright (c) 2014 tianliwei. All rights reserved.
//

#ifndef Rong360_Macros_h
#define Rong360_Macros_h


///////////////////////////////

#define ConfigUrl @"http://app.rong360.com/mfb/globalConfig"
#define CityUrl @"http://app.rong360.com/mfb/cityList"
#define TokenKey @"a4b154574052b48a9b945f81425d8adb"
#define AskUrl @"http://app.rong360.com/mfb/ask"
#define ReplyUrl @"http://app.rong360.com/mfb/reply"
#define ProductUrl @"http://app.rong360.com/mfb/productRec"
#define RecommendUrl @"http://www.rong360.com/credit/api/2/app_info.json?id=6"

///////////////////////////////

//HTMl5 页面

#define MFSFUrl @"http://m.rong360.com/maifangbao#/maifangshuifei/" //买房税费
#define GJJDKUrl @"http://m.rong360.com/maifangbao#/gongjijin/" //公积金贷款
#define SDBL @"http://m.rong360.com/maifangbao#/shangdaibanli/" //商贷办理
#define TXFC @"http://m.rong360.com/maifangbao#/tiaoxuanfangchan/" //挑选房产
#define TXZJ @"http://m.rong360.com/maifangbao#/tiaoxuanzhongjie/"//挑选中介
#define XFESFDB @"http://m.rong360.com/maifangbao#/xinjiuduibi/"//新房二手房对比

///////////////////////////////

#define TXZJDesc  @"【干货必读】如何找到靠谱的房产中介"
#define TXFCDesc  @"【干货必读】如何挑选适合自己的房子？楼层如何选择？"
#define MFSFDesc  @"【干货必读】新房二手房税费大起底"
#define GJJDKDesc @"【干货必读】最全的公积金贷款流程、注意事项"
#define SDBLDesc  @"【干货必读】最全的房贷办理流程、注意事项"
#define XFESFDBDesc @"【干货必读】新房VS二手房，新房二手房优缺点对比"

///////////////////////////////


#define kTabBarFontSize     11

#define kAppVersion         @"1.0"
#define kCurrentCity        @"CurrentCity"
#define kCurrentCityID      @"KCurrentCityID"
#define kUserMailBox        @"MailBox"
#define kOpenUdid           @"UDID"
#define kNewMsgNotification @"NewMsgNotification"
#define kUpdateCityNotification @"UpdateCityNotification"
#define kAskQuestionSuccess @"kAskQuestionSuccess"
#define kGetProductSuccess  @"GetProductSuccess"
#define kCity               @"CITY"
#define kProductInfo        @"ProductInfo"
#define kRecommendInfo      @"RecommendInfo"
#define kUMFeedbackKey      @"53254e1456240b03291d890d"
#define kUMSocialKey        @"53254e1456240b03291d890d"

#define kRongEvalue         @"http://m.rong360.com/#/cityNavi/"
#define kRong360Host        @"https://itunes.apple.com/us/app/rong360mai-fang-zhu-shou/id843981909?ls=1&mt=8"
#define kWXAppID            @"wx62c1e61baeabb1de"
#define kShareIcon          @"114"
#define kTencentID          @"101039109"
///////////////////////////////

#define HorizonScrollH  40
#define CalculatorViewH 180


#define UI_NAVIGATION_BAR_HEIGHT        44
#define UI_TOOL_BAR_HEIGHT              44
#define UI_TAB_BAR_HEIGHT               49
#define UI_STATUS_BAR_HEIGHT            20
#define UI_SCREEN_WIDTH                 320
#define UI_SCREEN_HEIGHT                ([[UIScreen mainScreen] bounds].size.height)
#define UI_APPFRAME_HEIGHT              ([[UIScreen mainScreen] applicationFrame].size.height)
#define UI_NAVIFRAME_HEIGHT             ([[UIScreen mainScreen] applicationFrame].size.height-UI_NAVIGATION_BAR_HEIGHT)


#define RGBACOLOR(r,g,b,a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:(a)]

#define RGBCOLOR(r,g,b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1]

#define UIColorFromRGB(rgbValue) [UIColor \
colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \
green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \
blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]

#define APPCOLOR RGBCOLOR(0, 172, 246)


#define IS_IPHONE_5 ( fabs( ( double )[ [ UIScreen mainScreen ] bounds ].size.height - ( double )568 ) < DBL_EPSILON )
#define IOS7_OR_LATER   ( [[[UIDevice currentDevice] systemVersion] compare:@"7.0"] != NSOrderedAscending )

#endif
